<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
<meta name="format-detection" content="telephone=no" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="robots" content="noindex,nofollow" />
<title>{$xg.sitename}</title>
<style>
body{text-align:center;background:#fff;overflow:hidden;}
.main{margin:50px auto;padding:30px;}
.goto{color:#27c;}
.links{margin-top:2em;}
.links a{color:#27c;}
.icon{margin:1em auto;}
.error{font-size:2.5em;color:#f33;line-height:1.2em;}
.success{font-size:2.5em;color:#5a5;line-height:1.2em;}
.message{font-size:2.5em;color:#f85;line-height:1.2em;}
.wait{margin-top:2em;}
</style>
</head>
<body>
<div class="main">
	{if 0 > $code}
		<!-- 错误消息 -->
		<div class="icon">
			<svg width="100" height="100" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
				<path fill="#f33" d="
					M512 64a448 448 0 1 1 0 896A448 448 0 0 1 512 64z m0 64a384 384 0 1 0 0 768A384 384 0 0 0 512 128z 
					m146.816 192l45.184 45.184L557.12 512 704 658.816l-45.184 45.184
					L512 557.12 365.184 704 320 658.816 466.816 512 320 365.184 365.184 320 512 466.816 658.816 320z
				"></path>
			</svg>
		</div>
		<div class="error">{$message}</div>
	{elseif $code>0}
		<!-- 成功消息 -->
		<div class="icon">
			<svg width="100" height="100" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
				<path fill="#5a5" d="
					M512 64a448 448 0 1 1 0 896A448 448 0 0 1 512 64z 
					m0 64a384 384 0 1 0 0 768A384 384 0 0 0 512 128z 
					m204.8 224l51.2 50.304L460.8 704 256 502.848l51.2-50.304L460.8 603.52l256-251.456z
				"></path>
			</svg>
		</div>
		<div class="success">{$message}</div>
	{else}
		<!-- 普通消息 -->
		<div class="icon">
			<svg width="100" height="100" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
				<path fill="#f85" d="
					M512 64a448 448 0 1 1 0 896A448 448 0 0 1 512 64z 
					m0 64a384 384 0 1 0 0 768A384 384 0 0 0 512 128z 
					m31.616 256v64h-0.384v256h62.912v64h-192v-64h65.088V448h-29.76V384h94.08z 
					m-36.672-44.8a41.6 41.6 0 1 0 0-83.2 41.6 41.6 0 0 0 0 83.2z
				"></path>
			</svg>
		</div>
		<div class="message">{$message}</div>
	{/if}
	<!-- 等候提示 -->
	<div id="wait" class="wait"></div>
	{if $links}
		<!-- 可选链接 -->
		<div class="links">
			{foreach $links $k $v}
				<a href="{$v}">{$k}</a>
			{/foreach}
		</div>
	{/if}
</div>
{if $goto}
	{if intval($wait)>0}
		<script>
			var doc=document.getElementById('wait');
			var wait=parseInt('{:intval($wait)}');
			var goto='{$goto}';
			jumpmsg();
			var timer=setInterval(function(){
				wait--;
				jumpmsg();
				if(wait<=0)location = goto;
			},1000);
			function jumpmsg(){
				doc.innerHTML=`页面将会在 ${wait} 秒后 <a class="goto" href="${goto}">跳转</a>`;
			}
		</script>
	{else}
		<script>location='{$goto}';</script>
	{/if}
{/if}
</body>
</html>